package com.nisco.dms.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import com.nisco.dms.entity.User;

/**
 * 
 * @author joey
 *
 */
public interface UserDao extends JpaRepository<User, String> {
	// 根据登录名查找用户
	User findBystrAccount(String strAccont);
	
	//根据id查询用户
	User findById(String id);
	// 根据实名查找用户
	User findByStrName(String strName);
	
	// 根据包含登录名(类似like)查找用户
	Page<User> findByStrAccountContaining(String strAccont, Pageable pageable);
	
	Page<User> findByCompanyIdAndIntIsActive(String CompanyId,int intIsActive,Pageable pageable);
}